package com.ycj.entropy.data;

import android.content.Context;

import androidx.room.Room;

public class DaoFactory {
    private static AppDatabase db;

    public static void init(Context context) {
        DaoFactory.db = Room.databaseBuilder(context, AppDatabase.class, "entropy-db")
                .fallbackToDestructiveMigration()
                .allowMainThreadQueries()
                .build();
    }

    public static StudyDao studyDao() {
        return db.studyDao();
    }

}
